﻿
#region Usings

using PolyGameEngine.GamePieces.Common;
using PolyGameEngine.Tools;

using FarseerPhysics.Dynamics;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

#endregion

namespace PolyMorph.CustomGamePieces
{
    public class Lava : SensorForceTile
    {
        public Lava(PhysicsGame PhysicsGame, World World, Material Material,
            Texture2D SpriteSheet, Vector2 Position, int saveLineIndex)
            : base(PhysicsGame, World, Material, SpriteSheet, 1, Position, 0, 1, 1, saveLineIndex, "Lava", 0)
        { }

        public override void Effect()
        {

            if (GamePieceInEffect.position.Y + 30 > position.Y)
            {
                AudioMan.PlayCue("Flare");
                LevelEditor.Level.Reload();
            }

        }
    }
}
